import static org.junit.Assert.*;

import org.junit.Test;


public class AccountTest {

	@Test
	public void testAccount() {
		Account a = new Account();
		assertEquals(0, a.getBalance());
	}
	
	@Test
	public void testDeposit() {
		Account a = new Account();
		a.deposit(20);
		assertEquals(20, a.getBalance());
	}
	
	@Test
	public void testWithdraw() {
		Account a = new Account();
		a.deposit(20);
		a.withdraw(10);
		assertEquals(10, a.getBalance());
	}
	
	@Test
	public void testTransfer() {
		Account from = new Account();
		Account to = new Account();
		from.deposit(100);
		from.transferTo(to, 40);
		assertEquals(60, from.getBalance());
		assertEquals(40, to.getBalance());
	}
}
